﻿/*------------------------------------------------
// File Description: LoadPack DataBase Entity
// Author:			 Crane
// Create Time:		 2020-06-16 11:30:55
//------------------------------------------------*/

using System;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace IOA.MES.DataAccess.Entity
{
    /// <summary>
    /// 装车包装
    /// </summary>
    [Table(nameof(LoadPack))]
    public class LoadPack : BaseEntity
    {
        private string _packBatchNo = string.Empty;
        private string _packNo = string.Empty;

        #region Public Property

        ///<Summary>
        /// 装车ID
        ///</Summary>
        public int LoadId { get; set; }

        ///<Summary>
        /// 打包批次号
        ///</Summary>
        public string PackBatchNo
        {
            get { return string.IsNullOrWhiteSpace(_packBatchNo) ? string.Empty : _packBatchNo; }
            set { _packBatchNo = value; }
        }

        ///<Summary>
        /// 打包编号
        ///</Summary>
        public string PackNo
        {
            get { return string.IsNullOrWhiteSpace(_packNo) ? string.Empty : _packNo; }
            set { _packNo = value; }
        }

        ///<Summary>
        /// 是否已装车
        ///</Summary>
        public bool Loaded { get; set; }
        #endregion
    }

    public partial class MESContext
    {
        /// <summary>
        /// 装车包装
        /// </summary>
        public virtual DbSet<LoadPack> LoadPacks { get; set; }
    }
}